/**
 * 
 */
package com.rst.doc.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.rst.common.domain.CommonDetailsTable;

/**
 * @author JavaDeamon
 *
 */
@Entity
@Table(name="DOCUMENT_ATTACHMENT_DETAILS")
public class DocumentAttachmentDetailsDTO extends CommonDetailsTable implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4952709071947391231L;
	private Long attachmentId;
	private Long documentId;
	private String attachmentName;
	private String attachmentContentType;
	private Integer attachmentSize;
	private String attachmentOriginalfileName;
	
	/**
	 * @return the attachmentId
	 * primary key
	 * autogenerated field
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ATTACHMENT_ID")
	public Long getAttachmentId() {
		return attachmentId;
	}
	/**
	 * @return the documentId
	 * contains the document id for which the attachment is associated
	 * cannot be null
	 */
	@Column(name="ATTACHMENT_DOC_ID", nullable=false)
	public Long getDocumentId() {
		return documentId;
	}
	/**
	 * @return the attachmentName
	 * contains the name of the attachment file to be put while saving
	 * cannot be null
	 * length is 60
	 */
	@Column(name="ATTACHMENT_FILE_NAME", nullable=false, length=60)
	public String getAttachmentName() {
		return attachmentName;
	}
	/**
	 * @return the attachmentContentType
	 * contains the content type of the attachment file to archive
	 * cannot be null
	 * lenngth is 30
	 */
	@Column(name="ATTACHMENT_CONTENT_TYPE", nullable=false, length=30)
	public String getAttachmentContentType() {
		return attachmentContentType;
	}
	/**
	 * @return the attachmentSize
	 * contains the size of attachment file in MB
	 * cannot be null
	 */
	@Column(name="ATTACHMENT_FILE_SIZE", nullable=false)
	public Integer getAttachmentSize() {
		return attachmentSize;
	}
	/**
	 * @return the attachmentOriginalfileName
	 * contains the original file name of the attachment file
	 * cannot be null
	 * length is 30
	 */
	@Column(name="ATTACHMENT_ORIG_FILE_NAME", nullable=false, length=30)
	public String getAttachmentOriginalfileName() {
		return attachmentOriginalfileName;
	}
	/**
	 * @param attachmentId the attachmentId to set
	 */
	public void setAttachmentId(Long attachmentId) {
		this.attachmentId = attachmentId;
	}
	/**
	 * @param documentId the documentId to set
	 */
	public void setDocumentId(Long documentId) {
		this.documentId = documentId;
	}
	/**
	 * @param attachmentPath the attachmentPath to set
	 */
	public void setAttachmentName(String attachmentName) {
		this.attachmentName = attachmentName;
	}
	/**
	 * @param attachmentContentType the attachmentContentType to set
	 */
	public void setAttachmentContentType(String attachmentContentType) {
		this.attachmentContentType = attachmentContentType;
	}
	/**
	 * @param attachmentSize the attachmentSize to set
	 */
	public void setAttachmentSize(Integer attachmentSize) {
		this.attachmentSize = attachmentSize;
	}
	/**
	 * @param attachmentOriginalfileName the attachmentOriginalfileName to set
	 */
	public void setAttachmentOriginalfileName(String attachmentOriginalfileName) {
		this.attachmentOriginalfileName = attachmentOriginalfileName;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "DocumentAttachmentDetailsDTO [attachmentId=" + attachmentId
				+ ", documentId=" + documentId + ", attachmentName="
				+ attachmentName + ", attachmentContentType="
				+ attachmentContentType + ", attachmentSize=" + attachmentSize
				+ ", attachmentOriginalfileName=" + attachmentOriginalfileName
				+ "]";
	}
}
